import React, { Component } from "react";
import { Container } from "./style";
import { Table,  } from "antd";

import moment from "moment";
import "moment/locale/zh-cn";
import "antd/dist/antd.css";
import ss from "../../../assets/image/ss.gif";

moment.locale("zh-cn");

// import connect from './connect'
// @connect
class index extends Component {
  render() {
   
    const dataSource = [
      //数据源
      {
        id: "1",
        number: "CK20201115001",
        date: "2020-11-15",
        type: "办公用品",
        amount: "1",
        name: "签字笔",
        code: "5hqzb",
        brand: "得力",
        model: "pen001",
        unit: "支",
        money: "1.5",
      },
      {
        id: "2",
        number: "CK20200125002",
        date: "2020-01-25",
        name: "16K打印纸",
        code: "16kdyz",
        type: "办公用品",
        brand: "得力",
        model: "16K",
        unit: "包",
        amount: "5",
        money: "60",
      },
      {
        id: "3",
        number: "CK20200521003",
        date: "2020-05-21",
        name: "黑色签字笔",
        code: "5hqzb",
        type: "办公用品",
        brand: "得力",
        model: "pen002",
        unit: "支",
        amount: "1",
        money: "2",
      },
      {
        id: "4",
        number: "CK20200521004",
        date: "2020-06-21",
        name: "五号签字笔",
        code: "whqzb",
        type: "办公用品",
        brand: "晨光",
        model: "pen05",
        unit: "支",
        amount: "5",
        money: "10",
      },
      {
        id: "5",
        number: "CK20200521005",
        date: "2020-11-01",
        name: "A4打印纸",
        code: "A4dyz",
        type: "办公用品",
        brand: "晨光",
        model: "pA430",
        unit: "包",
        amount: "10",
        money: "80",
      },
      {
        id: "6",
        number: "CK20200521006",
        date: "2020-03-02",
        name: "16k日记本",
        code: "16krjb",
        type: "办公用品",
        brand: "得力",
        model: "16k",
        unit: "本",
        amount: "3",
        money: "30",
      },
      {
        id: "7",
        number: "CK20200521007",
        date: "2020-12-11",
        name: "黑色签字笔芯",
        code: "hsqzbx",
        type: "办公用品",
        brand: "得力",
        model: "pen16.04/0.5",
        unit: "根",
        amount: "20",
        money: "10",
      },
      {
        id: "8",
        number: "CK20200521008",
        date: "2020-02-16",
        name: "五号电池",
        code: "5hdc",
        type: "生活用品",
        brand: "南孚",
        model: "dc01",
        unit: "节",
        amount: "10",
        money: "30",
      },
      {
        id: "9",
        number: "CK20200117009",
        date: "2020-01-17",
        name: "A3打印纸",
        code: "A3dyz",
        type: "办公用品",
        brand: "得力",
        model: "p3130",
        unit: "包",
        amount: "10",
        money: "80",
      },
      {
        id: "10",
        number: "CK20200921010",
        date: "2020-09-21",
        name: "粉笔",
        code: "fb",
        type: "办公用品",
        brand: "得力",
        model: "fb01",
        unit: "盒",
        amount: "1",
        money: "10",
      },
      {
        id: "11",
        number: "CK20200921011",
        date: "2020-09-21",
        name: "铅笔",
        code: "qb",
        type: "办公用品",
        brand: "得力",
        model: "qb2B",
        unit: "支",
        amount: "1",
        money: "1",
      },
      {
        id: "12",
        number: "CK20201121012",
        date: "2020-11-21",
        name: "宽胶带",
        code: "kjd",
        type: "办公用品",
        brand: "得力",
        model: "Dkjd",
        unit: "卷",
        amount: "1",
        money: "15",
      },
    ];
    const columns = [
      {
        title: "序号", //表头标题
        dataIndex: "id", //数据源
      },
      {
        title: "出库单号",
        dataIndex: "number",
      },
      {
        title: "申领日期",
        dataIndex: "date",
      },
      {
        title: "物品名称",
        dataIndex: "name",
      },
      {
        title: "物品编码",
        dataIndex: "code",
      },
      {
        title: "物品分类",
        dataIndex: "type",
      },
      {
        title: "品牌",
        dataIndex: "brand",
      },
      {
        title: "规格/型号",
        dataIndex: "model",
      },
      {
        title: "单位",
        dataIndex: "unit",
      },
      {
        title: "数量",
        dataIndex: "amount",
      },
      {
        title: "金额",
        dataIndex: "money",
      },
    ];
    return (
      <Container>
        <div className="applys_t">
          <img src={ss} alt="" />
          <span>
            2020.01.01 ~ 2020.12.28 期间，申领物品种类：
            <i>11</i>个，申领物品数量：
            <i>343</i>个，申领物品金额：
            <i>13032</i>元
          </span>
        </div>
        <div className="applys_b">
          <Table
            bordered
            columns={columns}
            dataSource={dataSource}
            pagination={{ total: 20, defaultCurrent: 1 }}
            // scroll={{ y: 240 }}
          />
        </div>
      </Container>
    );
  }
}

export default index;
